<?php

/**
 * 管理主控类
 */

namespace Manager\Controller;

use Think\Controller;

class ManagerController extends Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->_changeCssStatus();
    }

    public function _initialize(){
        $userName=session('adminId');

        if(empty($userName) && C('IS_CHECK')){
            $this->redirect('Manager/Login/login');
        }
    }

    protected function myRedirect($url,$arr=array(),$delay=0,$msg='')
    {
        $this->redirect($url,$arr=array(),$delay=0,$msg='');
    }


    /**
     * 处理首页导航css问题
     */
    private function _changeCssStatus()
    {

        $controller = trim(CONTROLLER_NAME);
        switch ($controller){
            case 'Config':
                $this->assign("config",'active');break;
        }
    }

}